#!/usr/bin/env bash

if [ $UID -ne 0 ]; then
  echo "Superuser privileges are required to run this script."
  echo "e.g. \"sudo $0\""
  exit 1
fi

docker stop intelli-community-admin

docker rm intelli-community-admin

docker rmi intelli-community-admin

docker build -t intelli-community-admin:latest .

docker run -d --name=intelli-community-admin -p 8090:8090 -e SERVER_PORT=8090 intelli-community-admin --restart=always
